﻿@model WebUI.Areas.Bots.Models.Schedule
@{
    Layout = MVC.Bots.Shared.Views._Main;
}
@section Title{@WebUI.Resources.Schedule}
@section PageName{@WebUI.Resources.Schedule}
<script type="text/javascript" language="javascript">
    $(document).ready(function () {
        $('.date').datepicker({
            dateFormat: "mm/dd/yy",
            minDate: '0'
        });
    });
    
</script>
@using (Html.BeginForm(MVC.Bots.Schedule.Save()))
{
    @Html.ValidationSummary(false)
    <div class="filter_bar">
        <h3>@WebUI.Resources.Schedule</h3>
        <div id="SpecificPeriodDiv">
            @WebUI.Resources.StartofPeriod
            @Html.TextBoxFor(model => model.StartPeriod, new { @class = "date", @readonly = "readonly" })
            @Html.ValidationMessageFor(model => model.StartPeriod)
            @Html.TextBoxFor(model => model.StartPeriodHour)
            @Html.ValidationMessageFor(model => model.StartPeriodHour)
            @WebUI.Resources.EndofPeriod
            @Html.TextBoxFor(model => model.EndPeriod, new { @class = "date", @readonly = "readonly" })
            @Html.ValidationMessageFor(model => model.EndPeriod)
            @Html.TextBoxFor(model => model.EndPeriodHour)
            @Html.ValidationMessageFor(model => model.EndPeriodHour)
        </div>
        <div>
            <div id="Recurring">
                <span>Recur Every</span>
                @Html.TextBoxFor(m => m.RecurringValue)
                @Html.ValidationMessageFor(model => model.RecurringValue)
                @Html.DropDownListFor(m => m.RecurringSpan, Model.Spans)
            </div>
        </div>
    </div>
    @Html.ActionLink(WebUI.Resources.Previous, MVC.Bots.BotType.Index(), new { @class = "prev btn" })
    <input type="submit" class="next btn" value='@WebUI.Resources.Next' />
}